package com.web.portal.pojo.response;

import com.baomidou.mybatisplus.annotation.*;
import com.web.portal.pojo.LabelArticle;
import com.web.portal.pojo.LabelInfo;
import com.web.portal.pojo.PortalUser;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("tb_article")
@ApiModel(description = "Article")
public class ArticleAndUserAndLabel {

    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    @TableField("article_code")
    private String articleCode;
    @TableField("title")
    private String title;
    @TableField("user_avatar")
    private String userAvatar;
    @TableField("user_name")
    private String userName;
    @TableField("category_id")
    private String categoryId;
    @TableField("article_type")
    private String articleType;
    @TableField("content")
    private String content;
    @TableField("text_type")
    private String textType;
    @TableField("state")
    private String state = "1";
    @TableField("summary")
    private String summary;
    @TableField("view_count")
    private Integer viewCount = 0; // 阅读数量
    @TableField("create_by")
    private String createBy;
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    @TableField(value = "is_delete", fill = FieldFill.INSERT)
    private String isDelete;

    private PortalUser portalUser;

    private List<LabelInfo> labelInfos;
}
